<template>
	<view style="padding: 20rpx;">
		<el-switch v-model="params.iosPay" active-text="ios支付" inactive-text="ios支付" @change="changeSetting" />
	</view>
</template>

<script>
	export default {
		data() {
			return {
				params: {
					iosPay: false
				}
			}
		},

		onLoad() {
			this.getSetting()
		},

		methods: {
			changeSetting() {
				this.$http.Post("admin/systemSetting/update", this.params).then(res => {
					this.getSetting()
				})
			},

			getSetting() {
				this.$http.Post("admin/systemSetting/get", {}).then(res => {
					this.params = res.data
				})
			},
		}
	}
</script>

<style>

</style>
